In [1]:
# Great but no patience to read that!
# I've collected that data in a csv file

In [3]:
!cat top-grossing-games.csv


Game,Sales (billions)
Westward Journey series,3.9
Dungeon Fighter Online,4
Donkey Kong,4.4
Wii Fit,5
Lineage series,5.7
Wii Sports,6
CrossFire,6.8
World of Warcraft,8.5
Street Fighter II,10.6
Pac-Man,12.8
Space Invaders,13.9

In [4]:
# Let's read that data in
import pandas as pd

In [5]:
top_games = pd.read_csv('top-grossing-games.csv')

In [6]:
top_games.head()


Out[6]:
Game Sales (billions)
0 Westward Journey series 3.9
1 Dungeon Fighter Online 4.0
2 Donkey Kong 4.4
3 Wii Fit 5.0
4 Lineage series 5.7

In [7]:
# let's see how this looks
# We will use Seaborn

import seaborn as sns

In [8]:
ax = sns.barplot(data=top_games, x='Sales (billions)', y='Game')

In [9]:
# doh. we don't have matplotlib inline
%matplotlib inline

In [10]:
ax = sns.barplot(data=top_games, x='Sales (billions)', y='Game')



In [11]:
# decent but needs some tweaks. Change the color palette. reorder the data.

In [12]:
data = top_games.sort('Sales (billions)', ascending=False)
ax = sns.barplot(data=data, x='Sales (billions)', y='Game', palette='Blues_d')



In [ ]:
# And we're done. Have a nice day!